<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\FrontUser */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="front-user-form">

    <?php $form = ActiveForm::begin(); ?>
    <?php if($model->isNewRecord){ ?>
    <?= $form->field($model, 'username')->textInput()->label('用户名') ?>
    <?= $form->field($model, 'email')->textInput()->label('用户邮箱')  ?>
    <?= $form->field($model, 'password_hash')->textInput()->label('密码') ?>
    <?php }?>
    <?= $form->field($model, 'company_name')->textInput()->label('公司名称')  ?>
    <?= $form->field($model, 'status')->dropDownList(['10' => '可用', '0' => '不可用'])->label('状态') ?>

    <div class="form-group">
        <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
